m <- leaflet() %>%
  addTiles() %>%  # Add default OpenStreetMap map tiles
  addMarkers(lng=-97.7431, lat=30.2672, popup="Austin, TX")
m  # Print the map
m %>% addProviderTiles(providers$Stamen.Toner)
reg=lm(calls~fampov, data=TrainingData)
summary(reg)
## 
## Call:
## lm(formula = calls ~ fampov, data = TrainingData)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -355.5 -215.5  -42.9  101.4  657.2 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) 204.7881   114.6450   1.786     0.09 .  
## fampov        0.8979     0.1793   5.008 7.81e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 292.7 on 19 degrees of freedom
## Multiple R-squared:  0.569,  Adjusted R-squared:  0.5463 
## F-statistic: 25.08 on 1 and 19 DF,  p-value: 7.805e-05
confint(reg)
##                   2.5 %     97.5 %
## (Intercept) -35.1666160 444.742884
## fampov        0.5226503   1.273144
plot(reg)

reg=lm(calls~mfi2013, data=TestData)
summary(reg)
## 
## Call:
## lm(formula = calls ~ mfi2013, data = TestData)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1492.7  -789.4  -372.4   278.1  4391.6 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept) 3167.93534  491.77186   6.442 3.04e-07 ***
## mfi2013       -0.02302    0.00591  -3.896 0.000469 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1211 on 32 degrees of freedom
## Multiple R-squared:  0.3217, Adjusted R-squared:  0.3005 
## F-statistic: 15.18 on 1 and 32 DF,  p-value: 0.0004686
confint(reg)
##                     2.5 %        97.5 %
## (Intercept) 2166.22884605 4169.64182306
## mfi2013       -0.03506137   -0.01098666
plot(reg)

### Using plotly_build()

### Using plotly_build()